html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #ffffff url('../img/geometry2.png'); /* Background pattern from Subtle Patterns */
    font-family: 'Coda', cursive;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

h1 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    color: #02b3e4;
}

/*
定义动画
*/
@keyframes rotating {
    0% {transform: none}
    10% {transform: rotate(30deg)}
    20% {transform: none}
    30% {transform: rotate(-30deg)}
    40% {transform: none}
    50% {transform: rotate(-30deg)}
    60% {transform: none}
    70% {transform: rotate(-30deg)}
    80% {transform: none}
    90% {transform: rotate(-30deg)}
    100% {transform: none}
}

/*
 * Styles for the deck of cards
 */
@media screen and (min-width: 1025px){
    h1 {
        font-size: 3em;
        font-weight: bold;
    }

    .score-panel {
        font-size: 1.8em;
    }

    .deck {
        width: 50%;
        min-height: 680px;
    }

    .deck .card {
        min-height: 125px;
    }
}

@media screen and (min-width: 720px) and (max-width: 1024px){
    h1 {
        font-size: 3em;
        font-weight: bold;
    }

    .deck {
        width: 80%;
        min-height: 760px;
    }

    .deck .card {
        min-height: 130px;
    }

    .score-panel {
        font-size: 2em;
    }
}

@media screen and (max-width: 719px){
    h1 {
        font-weight: bold;
    }

    .deck{
        width: 90%;
        min-height: 400px;
    }

    .deck .card {
        min-height: 70px;
    }

    .score-panel {
        font-size: 1.3em;
    }
}
.deck {
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    padding: 3%;
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 3em;
}

.deck .card {
    width: 22%;
    background: #2e3d49;
    font-size: 0;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5);
}

.deck .card.open {
    transform: rotateY(0);
    background: #02b3e4;
    cursor: default;
}

.deck .card.show {
    font-size: 2em;
}

.deck .card.match {
    cursor: default;
    background: greenyellow;
    font-size: 2em;
    animation: rotating 1s;
}

/*
 * Styles for the Score Panel
 */

.score-panel {
    text-align: left;
    margin-bottom: 10px;
}

/*图标颜色定义*/
.icon-star {
    color: #02ccba;
}

.icon-caret-right {
    color: #02ccba;
}

.icon-apple {
    color: orange;
}

.icon-repeat {
    color: greenyellow;
}

.game_moves {
    display: inline-block;
    margin-bottom: 10px;
}

.win_box {
    text-align: left;
    width: 150px;
}

.win_box .stars, .total_moves, .total_time{
    display: block;
}

.score-panel .stars, .win_box .stars {
    margin: 0;
    padding: 0;
    display: inline-block;
    margin: 0 5px 0 0;
}

.score-panel .stars li, .win_box .stars li {
    list-style: none;
    display: inline-block;
}

.score-panel .restart, .start, .time_out {
    float: right;
    cursor: pointer;
}

.start, .restart {
    margin-right: 20px;
}

.spend_time {
    margin: 0 10px;
    display: inline;
}

.buttons {
    margin-top: 20px;
}

.again, .out {
    border: 1px solid cadetblue;
    border-radius: 20px;
}

.again {
    background-color: lightskyblue;
    margin-right: 10px;
}

.out {
    background-color: aliceblue;
}

